package com.yanqu.road.server.cmd.activity.tonbing;

import com.yanqu.road.message.YanQuMessage;
import com.yanqu.road.pb.activity.TonBingProto;
import com.yanqu.road.server.cmd.CrossCommand;
import com.yanqu.road.server.command.Cmd;
import com.yanqu.road.server.manager.activity.tonbing.CrossTonBingMgr;
import com.yanqu.road.server.manager.activity.tonbing.activity.CrossTonBingActivity;
import com.yanqu.road.server.protocol.CrossProtocol;

@Cmd(code = CrossProtocol.C2_CROSS_TON_BING_BARRACKS, desc = "")
public class CrossTonBingBarracksCmd extends CrossCommand {

    @Override
    public boolean parseData(YanQuMessage packet) throws Exception {
        TonBingProto.CrossTonBingReqMsg reqMsg = TonBingProto.CrossTonBingReqMsg.parseFrom(packet.getBytes());
        CrossTonBingActivity activity = CrossTonBingMgr.getActivity(reqMsg.getActivityId());
        activity.setLastReqTime(packet.getPlayerId());
        activity.getUserBarracksInfo(packet.getPlayerId());
        return true;
    }

    @Override
    public void execute(YanQuMessage packet) throws Exception {

    }

    @Override
    public void sendData() {

    }
}
